clear
echo -e "\e[1m\e[97m[\e[32mVisualK-OS Control Center Launcher\e[97m]"
echo -e "------------------------------------"
echo -e "\e[0m   * Setting environment vars (TERM=xterm256-color)"
export TERM=xterm-256color



# Select run mode
modes=("Normal" "No Curses UI" "Emulate Slaves" "Exit")
echo ""; CMDFLAGS=""
echo -e "\e[1m\e[34mChoose running mode:\e[36m"
select opt in "${modes[@]}"; do
    case $opt in
	${modes[0]}) CMDFLAGS=""; break;;
        ${modes[1]}) CMDFLAGS="NO_CURSES_UI"; break;;
        ${modes[2]}) CMDFLAGS="EMULATE_SLAVES"; break;;
	${modes[3]}) CMDFLAGS="EXIT"; break;;
	*) echo -e "\e[1m\e[5m\e[91mInvalid selection.\e[0m"
    esac
done

# Process selection
if [ "$CMDFLAGS" == "EXIT" ]; then echo -e "\e[0m"; exit; fi

# Display any selected arguments
if [ "$CMDFLAGS" != "" ]
  then
    echo ""; echo -e "\e[35m[*] \e[37margs: $CMDFLAGS"
  else
    echo ""; echo -e "\e[35m[no args selected]"
fi

# Launch
echo -e "\n\e[32m* Launching script \e[97m\"\e[94mVKOS_ControlConsole.py\e[97m\"\e[32m..."
echo -e "\e[0m"; sleep 1s
python VKCC.py $CMDFLAGS

